<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../org/angular.min.js"></script>
    <style>
        input[readonly] {
            background-color: #f3f3f3;
            border: 1px solid red;
        }
    </style>
</head>

<body ng-app="app" ng-controller="ctrl">
    用户名：<input type="text" name="" ng-model="user.name"><br> 邮箱: <input type="email" name="" ng-model="user.email" ng-readonly="user.uid">
    <script>
        var m = angular.module('app', []);
        m.controller('ctrl', ['$scope', function($scope) {
            $scope.user = {
                name: 'yu',
                email: 'laozhou@qq.com',
                uid: 1
            };
        }])
    </script>
</body>

</html>
